﻿import java.util.Scanner;

public class MyDCTest extends IntRandom
{

    public static void main (String[] args) {

        String again;

        int result;

        try
        {
            Scanner in = new Scanner(System.in);

            do
            {
                MyDC evaluator = new MyDC();

                IntRandom arr = new IntRandom();
                String[] arr2 = arr.InRandom();
                for (int i = 0;i < arr2.length;i++ ) {
                    result = evaluator.evaluate(arr2[i]);
                    System.out.println();
                    System.out.println("That expression equals " + result);
                }
                System.out.print ("Evaluate another expression [Y/N]? ");
                again = in.nextLine();
                System.out.println();
            }
            while (again.equalsIgnoreCase("y"));
        }
        catch (Exception IOException)
        {
            System.out.println("Input exception reported");
        }
    }
}
